//
//  ContentView.swift
//  SwiftUIDemo
//
//  Created by Felix Hi on 2021/6/27.
//

import SwiftUI

struct ContentView: View {
    var body: some View {
        NavigationView {
            List(0 ..< 5) { item in
                Cell()
            }
            .navigationBarTitle("SwiftUI_Learn")
        }
    }
}

struct ContentView_Previews: PreviewProvider {
    static var previews: some View {
        ContentView()
    }
}

struct Cell: View {
    var body: some View {
        NavigationLink(
            destination: DetailView(),
            label: {
                Image("docker")
                    .resizable()
                    .cornerRadius(8.0)
                    .scaledToFit()
                    .frame(width: 100, height: 100, alignment: .center
                    )
                VStack {
                    Text("荷兰风车")
                    Text("巴黎凯旋门")
                        .font(.subheadline)
                        .foregroundColor(.secondary)
                }
            })
    }
}
